/**
 * Created by Freeman on 2017/12/27.
 */
import React from 'react'
import {StyleSheet, Text, TouchableOpacity} from 'react-native'
import PropTypes from 'prop-types'
import {COLOR} from "../../config";

const BlockButton = ({onClick, children}) => {

  return (
    <TouchableOpacity
      onPress={(e) => onClick(e)}
      style={styles.container}
    >
      <Text style={styles.text}>{children}</Text>
    </TouchableOpacity>
  )
}

const styles = StyleSheet.create({
  container: {
    height: 45,
    marginTop: 10,
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    borderColor: COLOR.linePrompt,
    borderTopWidth: 1,
    backgroundColor: '#FFFFFF'
  },
  text: {
    color: '#000',
    fontSize: 16,
  }
})

BlockButton.propTypes = {
  onClick: PropTypes.func,
}

export default BlockButton
